package cn.highset.modules.base.entity;

import cn.highset.base.HighsetBaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author Victor
 */
@Data
@Entity
@Table(name = "t_video")
@TableName("t_video")
@SQLDelete(sql = "update t_video set del_flag= 1 where id =?")
@SQLDeleteAll(sql = "update t_video set del_flag= 1 where id =?")
@Where(clause = "del_flag=0")
@ApiModel(value = "视频表")
public class Video extends HighsetBaseEntity {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "视频标题")
    private String title;
    @ApiModelProperty(value = "封面图地址")
    private String imageUrl;
    @ApiModelProperty(value = "视频地址")
    private String videoUrl;

    @ApiModelProperty(value = "排序值")
    @Column(precision = 10, scale = 2)
    private BigDecimal sortOrder;
    @ApiModelProperty(value = "推送首页")
    private Boolean pushHome;

}
